#ifndef TB_HASH_CRC8_H
#define TB_HASH_CRC8_H

#include "prefix.h"

#define tb_crc8_make_value(mode, crc, value) tb_crc8_make(mode, crc, (tb_byte_t const*)&(value), sizeof(value))

__tb_extern_c_enter__

tb_uint8_t tb_crc8_make(tb_byte_t const* data, tb_size_t size, tb_uint8_t seed);

tb_uint8_t tb_crc8_make_from_cstr(tb_char_t const *cstr, tb_uint8_t seed);

__tb_extern_c_leave__

#endif // !TB_HASH_CRC8_H
